import request from '@/utils/request'

// 查询容器列表
export function listContainer (query) {
  return request({
    url: '/dockerinsight/container/list',
    method: 'get',
    params: query
  })
}

// 查询容器详细
export function getContainer (id) {
  return request({
    url: '/dockerinsight/container/' + id,
    method: 'get'
  })
}

// 新增容器
export function addContainer (data) {
  return request({
    url: '/dockerinsight/container',
    method: 'post',
    data: data
  })
}

// 修改容器
export function updateContainer (data) {
  return request({
    url: '/dockerinsight/container',
    method: 'put',
    data: data
  })
}

// 删除容器
export function delContainer (id) {
  return request({
    url: '/dockerinsight/container/' + id,
    method: 'delete'
  })
}

// 导出容器
export function exportContainer (query) {
  return request({
    url: '/dockerinsight/container/export',
    method: 'get',
    params: query
  })
}

// 获取初始化数据
export function getInitData (dictTypes) {
  return request({
    url: '/dockerinsight/container/getInitData/' + dictTypes,
    method: 'get'
  })
}
